<h1><?php echo $contents->category->name; ?></h1>
<div class="search">
	<form method="GET">
	<label>กลุ่ม </label>
	 <?php echo form_dropdown('group_id', option(new Group, 'id', 'name'), @$_GET['group_id']); ?>
	 <?php echo form_hidden('agency_id',$_GET['agency_id']) ?>
	  <input type="submit" value="ค้นหา" />
	</form>
</div>
<table class="list">
	<tr>
		<th>ชื่อ - นามสกุล</th>
		<th>ตำแหน่ง</th>
		<th>กลุ่ม</th>
		<th>อีเมล์</th>
		<th width="90"><a class="btn" href="boards/admin/boards/form?agency_id=<?php echo @$_GET['agency_id']; ?>">เพิ่มรายการ</a></th>
		<!--<th></th>-->
	</tr>
	<?php foreach($contents as $content): ?>
	<tr>
		<td><?php echo $content->firstname.' '.$content->lastname; ?></td>
		<td><?php echo $content->position; ?></td>
		<td><a href="boards/admin/boards/?agency_id=<?php echo @$_GET['agency_id']; ?>&group_id=<?php echo $content->group->id ?>" ><?php echo $content->group->name; ?></a></td>
		<td><?php echo $content->email; ?></td>
		<td>
			<a class="btn" href="boards/admin/boards/form/<?php echo $content->id?>/?agency_id=<?php echo @$_GET['agency_id']; ?>" >แก้ไข</a>
			<a class="btn" href="boards/admin/boards/delete/<?php echo $content->id?>/?agency_id=<?php echo @$_GET['agency_id']; ?>" onclick="return confirm('ยืนยันการลบ')">ลบ</a>
		</td>
		<!--<td>
			<?php if(is_file('uploads/board/'.$content->image)): ?>
			<?php echo anchor('boards/admin/boards/delete_img/'.$content->id.'/?agency_id='.$_GET['agency_id'],'x','class="btn"').br() ?>
			<?php echo img('uploads/board/'.$content->image).br()  ?>
			<?php else: ?>
			<?php echo img('themes/default/images/img.jpg').br() ?>
			<?php endif; ?>
		</td>-->
	</tr>
	<?php endforeach; ?>
</table>
<?php echo $contents->pagination(); ?>
